package com.crm.entity;

import java.io.Serializable;
import java.sql.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="supply_order")
public class SupplyOrder implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Id
	@GeneratedValue(generator="increment")
	@GenericGenerator(name="increment", strategy = "increment")
	
	private int id;
	private int quotid;
	private int prtid;
	private int qty;
	private float price;
	private int discount;
	private float prc_aftr_discount;
	private String invoice;
	private Date pi_date;
	private String suplyOrderNum;
	private Date date;
	 private Date bgdate;
	 private Date bgedate;
	 private Date wargdate;
	 private  Date waredate;
	 
	 @Column(name="start_date")
	 private  java.util.Date soStartDate;
	 
	 @Column(name="end_date")
	 private  java.util.Date soEndDate;
	
	 
	@ManyToOne
	@JoinColumn(name="BUSINESS_ID")
	private Business businessId;
	
	public SupplyOrder(){}
	
	public SupplyOrder(int quotid, int prtid, int qty, float price,
			int discount, float prc_aftr_discount, String invoice,
			Date pi_date, String suplyOrderNum, Date date,
			Business businessId) {
		super();
		this.quotid = quotid;
		this.prtid = prtid;
		this.qty = qty;
		this.price = price;
		this.discount = discount;
		this.prc_aftr_discount = prc_aftr_discount;
		this.invoice = invoice;
		this.pi_date = pi_date;
		this.suplyOrderNum = suplyOrderNum;
		this.date = date;
		this.businessId = businessId;
	}
	public Business getBusinessId() {
		return businessId;
	}
	public void setBusinessId(Business businessId) {
		this.businessId = businessId;
	}
	public String getSuplyOrderNum() {
		return suplyOrderNum;
	}
	public void setSuplyOrderNum(String suplyOrderNum) {
		this.suplyOrderNum = suplyOrderNum;
	}
	public String getInvoice() {
		return invoice;
	}
	public void setInvoice(String invoice) {
		this.invoice = invoice;
	}
	public int getId() {
		return id;
	}
	public void setId(int id) {
		this.id = id;
	}
	public int getQuotid() {
		return quotid;
	}
	public void setQuotid(int quotid) {
		this.quotid = quotid;
	}
	
	
	public int getPrtid() {
		return prtid;
	}
	public void setPrtid(int prtid) {
		this.prtid = prtid;
	}
	public int getQty() {
		return qty;
	}
	public void setQty(int qty) {
		this.qty = qty;
	}
	public float getPrice() {
		return price;
	}
	public void setPrice(float price) {
		this.price = price;
	}
	public int getDiscount() {
		return discount;
	}
	public void setDiscount(int discount) {
		this.discount = discount;
	}
	public float getPrc_aftr_discount() {
		return prc_aftr_discount;
	}
	public void setPrc_aftr_discount(float prc_aftr_discount) {
		this.prc_aftr_discount = prc_aftr_discount;
	}

	public Date getPi_date() {
		return pi_date;
	}

	public void setPi_date(Date pi_date) {
		this.pi_date = pi_date;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public Date getBgdate() {
		return bgdate;
	}

	public void setBgdate(Date bgdate) {
		this.bgdate = bgdate;
	}

	public Date getBgedate() {
		return bgedate;
	}

	public void setBgedate(Date bgedate) {
		this.bgedate = bgedate;
	}

	public Date getWargdate() {
		return wargdate;
	}

	public void setWargdate(Date wargdate) {
		this.wargdate = wargdate;
	}

	public Date getWaredate() {
		return waredate;
	}

	public void setWaredate(Date waredate) {
		this.waredate = waredate;
	}

	public java.util.Date getSoStartDate() {
		return soStartDate;
	}

	public void setSoStartDate(java.util.Date soStartDate) {
		this.soStartDate = soStartDate;
	}

	public java.util.Date getSoEndDate() {
		return soEndDate;
	}

	public void setSoEndDate(java.util.Date soEndDate) {
		this.soEndDate = soEndDate;
	}

	
}
